<jsp:useBean id="securityConstant" class="com.x.security.util.Constant" scope="request"/>
<%@page import="com.github.tobato.fastdfs.FdfsClientConstants"%>
<%@page import="com.x.erp.util.Constant"%>

<%@include file="/common/taglibs.jsp"%>

<c:set var="fdfsPath" value="${FdfsClientConstants.CLIENT_REQUEST_URL}" scope="request" />
<c:set var="crmSecurityLoginUrl" value="${Constant.CRM_SECURITY_LOGIN_URL}" scope="request" />
<c:set var="securityAccount" value="${sessionScope.SECURITY_ACCOUNT}" scope="request" />
<c:set var="userId" value="${sessionScope.userId}" scope="request" />
<c:set var="userName" value="${sessionScope.userName}" scope="request" />
<c:set var="userMobile" value="${sessionScope.userMobile}" scope="request" />
<c:set var="userType" value="${sessionScope.userType}" scope="request" />
<c:set var="userState" value="${sessionScope.userState}" scope="request" />
<c:set var="marketId" value="${sessionScope.marketId}" scope="request" />
<c:set var="shopId" value="${sessionScope.shopId}" scope="request" />
<c:if test="${!empty securityAccount}">
    <c:set var="accountId" value="${securityAccount.accountId}" scope="request" />
    <c:set var="accountName" value="${securityAccount.accountName}" scope="request" />
    <c:set var="applicationName" value="${securityAccount.application.applicationName}" scope="request" />
    <SCRIPT LANGUAGE="JavaScript" >
        sessionStorage.setItem("ctx", "${ctx}");
        sessionStorage.setItem("fdfsPath", "${fdfsPath}");
        sessionStorage.setItem("accountId", "${accountId}");
        sessionStorage.setItem("accountName", "${accountName}");
        sessionStorage.setItem("userId", "${userId}");
        sessionStorage.setItem("userType", "${userType}");
        sessionStorage.setItem("userName", "${userName}");
        sessionStorage.setItem("userMobile", "${userMobile}");
        sessionStorage.setItem("marketId", "${marketId}");
        <c:if test="${!empty shopId}">
        sessionStorage.setItem("shopId", "${shopId}");
        </c:if>
        <c:if test="${empty shopId}">
        sessionStorage.setItem("shopId", "");
        </c:if>
    </SCRIPT>
</c:if>
